package com.example.javacv;

import org.bytedeco.javacv.FFmpegFrameFilter;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.FFmpegFrameRecorder;

/**
 * 测试
 *
 * @author yzh
 * @date 2022/12/22
 */
public class Test {
    public static void main(String[] args) throws FFmpegFrameGrabber.Exception {
        FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("D:\\1.mp4");
        grabber.start();
        int timeLen = (int) grabber.getLengthInTime() / 1000000;
        System.out.println(timeLen);
    }
}
